﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Speakup
{
    public static class Level
    {
        public static int Unit2Level(int unit)
        {
            return unit/5+1;
        }

        public static List<int> Level2Unit(int level)
        {
            List<int> units = new List<int>();
            for(int i = 1; i <= 5; i++)
            {
                units.Add( (level-1)*5 + i);
            }
            return units;
        }

        public static bool IsUnitFromLevel(int unit, int level)
        {
            return (level - 1) * 5 < unit && unit < (level * 5);
        }
    }
}
